package cn.iocoder.yudao.module.digital.service.cardchannel.model;

/**
 * Description: 必须生成卡密成功 + 查询卡密账户成功，才算成功
 * Author: li
 * Date: 2024/3/6
 */
public class GenerateEGiftResponseWrapper {
    private final String generateEGiftRequestId;

    private final GenerateEGiftResponse generateEGiftResponse; // 生成卡密响应
    private final boolean generateEGiftSuccess; // 生成卡密是否成功
    private final Integer generateEGiftStatusCode;
    private String generateEGiftErrorMsg; // 生成卡密错误文案

    private final boolean needRevert; // 是否需要撤销

    private GetAccountResponseWrapper getAccountResponseWrapper; // 查询卡密账户响应
    private String nextIndexGenerateEGiftRequestId;
    private boolean revertSuccess = false; // 是否撤销成功

    public GenerateEGiftResponseWrapper(String generateEGiftRequestId, GenerateEGiftResponse generateEGiftResponse,
                                        Integer generateEGiftStatusCode,
                                        boolean generateEGiftSuccess, String generateEGiftErrorMsg, boolean needRevert) {
        this.generateEGiftRequestId = generateEGiftRequestId;
        this.generateEGiftResponse = generateEGiftResponse;
        this.generateEGiftStatusCode = generateEGiftStatusCode;
        this.generateEGiftSuccess = generateEGiftSuccess;
        this.generateEGiftErrorMsg = generateEGiftErrorMsg;
        this.needRevert = needRevert;
    }

    public String getGenerateEGiftRequestId() {
        return generateEGiftRequestId;
    }

    public GenerateEGiftResponse getGenerateEGiftResponse() {
        return generateEGiftResponse;
    }

    public Integer getGenerateEGiftStatusCode() {
        return generateEGiftStatusCode;
    }

    public boolean isGenerateEGiftSuccess() {
        return generateEGiftSuccess;
    }

    public String getGenerateEGiftErrorMsg() {
        return generateEGiftErrorMsg;
    }

    public void setGenerateEGiftErrorMsg(String generateEGiftErrorMsg) {
        this.generateEGiftErrorMsg = generateEGiftErrorMsg;
    }

    public boolean isNeedRevert() {
        return needRevert;
    }

    public GetAccountResponseWrapper getGetAccountResponseWrapper() {
        return getAccountResponseWrapper;
    }

    public void setGetAccountResponseWrapper(GetAccountResponseWrapper getAccountResponseWrapper) {
        this.getAccountResponseWrapper = getAccountResponseWrapper;
    }

    public String getNextIndexGenerateEGiftRequestId() {
        return nextIndexGenerateEGiftRequestId;
    }

    public void setNextIndexGenerateEGiftRequestId(String nextIndexGenerateEGiftRequestId) {
        this.nextIndexGenerateEGiftRequestId = nextIndexGenerateEGiftRequestId;
    }

    public boolean isRevertSuccess() {
        return revertSuccess;
    }

    public void setRevertSuccess(boolean revertSuccess) {
        this.revertSuccess = revertSuccess;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("GenerateEGiftResponseWrapper{");
        sb.append("generateEGiftRequestId='").append(generateEGiftRequestId).append('\'');
        sb.append(", generateEGiftResponse=").append(generateEGiftResponse);
        sb.append(", generateEGiftSuccess=").append(generateEGiftSuccess);
        sb.append(", generateEGiftStatusCode=").append(generateEGiftStatusCode);
        sb.append(", generateEGiftErrorMsg='").append(generateEGiftErrorMsg).append('\'');
        sb.append(", needRevert=").append(needRevert);
        sb.append(", getAccountResponseWrapper=").append(getAccountResponseWrapper);
        sb.append(", nextIndexGenerateEGiftRequestId='").append(nextIndexGenerateEGiftRequestId).append('\'');
        sb.append(", revertSuccess=").append(revertSuccess);
        sb.append('}');
        return sb.toString();
    }
}
